<h1>Listing cars</h1>

<table>
  <tr>
    <th>User</th>
    <th>Car brand</th>
    <th>Car model</th>
    <th>Year</th>
    <th>Engine type</th>
    <th>Gearbox type</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @cars.each do |car| %>
  <tr>
    <td><%= car.user_id %></td>
    <td><%= car.car_brand_id %></td>
    <td><%= car.car_model_id %></td>
    <td><%= car.year %></td>
    <td><%= car.engine_type_id %></td>
    <td><%= car.gearbox_type_id %></td>
    <td><%= link_to 'Show', car %></td>
    <td><%= link_to 'Edit', edit_car_path(car) %></td>
    <td><%= link_to 'Destroy', car, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Car', new_car_path %>
